// base
import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
// less
import './index.less'

class WorkExpCard extends Component {
  componentWillMount () {
    // onLoad
  }

  componentDidMount () {
    // onready
  }

  componentWillUnmount () {
    // onUnload
  }

  componentWillReceiveProps (nextprops) {}

  onTap = id => {
    this.props.onTap(id)
  }
  render () {
    const { dataSource } = this.props
    return (
      <View className="WorkExpCard_id81946" onClick={this.onTap.bind(this, dataSource.id)}>
        <View className="left">
          <View className="line">
            <View className="yellow-dot" />
            <Image
              className="line-dot"
              src="https://imagesize.hrwork.com/sp/files/72dc1b7b-7129-4d12-b99d-a65cd8d3ae4d.png"
            />
            <View className="yellow-dot" />
          </View>
          <View className="time">
            <View className="time-t">{dataSource.beginTime}</View>
            <View className="time-t">{dataSource.endTime}</View>
          </View>
        </View>
        <View className="right">
          <View className="title">{dataSource.jobtitle}</View>
          <View className="company">{dataSource.cpname}</View>
          <View className="line" />
          <View className="content">{dataSource.workcontent}</View>
        </View>
      </View>
    )
  }
}

export default WorkExpCard
